<?php

require("config.php");

function __autoload($class) {
	$external = EXT_LIB.$class.'.php';
	$files_sys = DIR_ROOT.$class.".class.php";
	$framework_class = DIR_FRAMEWORK.$class.'.class.php';
	$controller_app = APP_CONTROLLER.$class.".class.php";
	$model_app = APP_MODEL.$class.".class.php";
	$dba = DBA.$class.'.class.php';
	if(file_exists($files_sys)) {
		require $files_sys;
	}
	if(file_exists($framework_class)) {
		require $framework_class;
		return false;
	}
	if(file_exists($controller_app)) {
		require $controller_app;
		return false;	
	}
	if(file_exists($model_app)) {
		require $model_app;
		return false;	
	}
	if(file_exists($dba)) {
		require $dba;	
	}
	if(file_exists($external)) {
		require $external;
	}
}

$app = new Bootstrap;

?>